#include <bits/stdc++.h>

using namespace std;
using ll = long long;

void solve() {
	int n;
	cin >> n;
	ll ans = LLONG_MIN;
	for (int i = 0; i < n; i++) {
		ll x;
		cin >> x;
		ans = max(ans, x);
	}
	cout << ans << endl;
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	
	int t;
	cin >> t;
	while (t-- > 0) {
		solve();
	}
	return 0;
}
